﻿{layout:default} {class:Shop.Admin.Supplier.UserMoney}
<lbhead>
    <title><%=Tag("资金明细")%>-<%=site.title%></title>
</lbhead>
<lbpath>
    <div class="tools">
        <ul>
            <%if (PageReturnMsg == ""){%>
            <li class="add"><a href="javascript:void(0);" onclick="EditObj('<%=user.UserName %>',0);"><b></b><span><%=Tag("添加")%></span></a></li>
            <%}%>
            <li class="name"><span id="navIgation"><%=Tag("当前位置")%>：<a href="<%=site.AdminPath %>/Ajax/ajax_supplier.aspx?__Action=MenuJump&pid=0"><%=Tag("管理首页")%></a><%if (user_id > 0){ %> > <a href="<%=site.AdminPath %>/supplier/user.aspx"><%=Tag("商家列表")%></a><%} %> > <%=Tag("资金明细")%></span>
           </li>
        </ul>
    </div>
</lbpath>
<lbbody>
    <div class="searchbox">
        <select name="status" id="status">
            <option value="0">┌ <%=Tag("状态")%></option>
            <%=Shop.Bussiness.EX_Type.TypeOption("MoneyStatus", status)%>
        </select>
        <input type="text" name="dateFrom" id="dateFrom" size="12" class="input-calendar" value="<%=dateFrom %>" /> - <input type="text" name="dateTo" id="dateTo" size="12" class="input-calendar" value="<%=dateTo %>" />
        <input name="key" type="text" id="key" class="input-query" value="<%=key %>" onkeydown="if(event.keyCode==13){search_();}" /><input type="button" id="btnSou" class="btn-query" onclick="search_();" align="absmiddle" />
    </div>
    <table class="datalist">
        <tr class="title">
            <th style="width: 100px">
                <%=Tag("商家账号")%>
            </th>
            <th style="width: 100px">
                <%=Tag("店铺简称")%>
            </th>
            <th style="width: 100px">
                <%=Tag("金额")%>
            </th>
            <th style="width: 100px">
                <%=Tag("类型")%>
            </th>
            <th style="width: 100px">
                <%=Tag("状态")%>
            </th>
            <th style="width: 120px">
                <%=Tag("订单")%>
            </th>
            <th style="width: 130px">
                <%=Tag("时间")%>
            </th>
            <th style="width: 120px">
                <%=Tag("管理员")%>
            </th>
            <th style="width: 130px">
                <%=Tag("操作时间")%>
            </th>
            <th>
                <%=Tag("操作")%>
            </th>
        </tr>
        <%foreach (Shop.Model.Lebi_Supplier_Money model in models)
          {
           %>
        <tr class="list">
            <td>
                <a href="?user_id=<%=model.Supplier_id%>"><%=model.User_UserName%></a>
            </td>
            <td>
                <%=model.Supplier_SubName %>
            </td>
            <td>
                <%=FormatMoney(model.Money) %>
            </td>
            <td>
                <%=Shop.Bussiness.EX_Type.TypeName(model.Type_id_SupplierMoneyType)%>
            </td>
             <td>
                <%=Shop.Bussiness.EX_Type.TypeName(model.Type_id_MoneyStatus)%>
            </td>
             <td>
                <a href="../order/order_view.aspx?id=<%=model.Order_id %>"><%=model.Order_Code %></a>
            </td>
            <td>
                <%=FormatTime(model.Time_Add) %>
            </td>
            <td>
                <%=model.Admin_UserName %>
            </td>
            <td>
                <%if (model.Admin_UserName != "")
                  {%><%=model.Time_Update %><%}else{%>&nbsp;<%} %>
            </td>
            <td>
                <a href="javascript:void(0)" onclick="EditObj('<%=model.Supplier_SubName%>',<%=model.id %>);"><%=Tag("编辑")%></a> 
            </td>
        </tr>
        <%} %>
    </table>
    <script type="text/javascript">
        function search_() {
            var key = $("#key").val();
            var dateFrom = $("#dateFrom").val();
            var dateTo = $("#dateTo").val();
            var status = $("#status").val();
            window.location = "?key=" + escape(key) + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "&status=" + status;
        }
        function EditObj(User_Name,id) {
            var title_ = "<%=Tag("编辑资金")%>";
            if (id ==0)
                var title_ = "<%=Tag("添加资金")%>";
            var url_ = "money_edit_window.aspx?User_Name=" + User_Name+"&id="+id;
            var width_ = 600;
            var height_ = "auto";
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_);
        }
    </script>
</lbbody>
<lbbottom>
    <div class="bottom" id="body_bottom">
        <%=PageString%>
    </div>
</lbbottom>